/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "SCATBP_FLAG")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ScatbpFlag.findAll", query = "SELECT s FROM ScatbpFlag s"),
    @NamedQuery(name = "ScatbpFlag.findByIdFlag", query = "SELECT s FROM ScatbpFlag s WHERE s.idFlag = :idFlag"),
    @NamedQuery(name = "ScatbpFlag.findByVNomFlag", query = "SELECT s FROM ScatbpFlag s WHERE s.vNomFlag = :vNomFlag"),
    @NamedQuery(name = "ScatbpFlag.findByVNomCorto", query = "SELECT s FROM ScatbpFlag s WHERE s.vNomCorto = :vNomCorto")})
public class ScatbpFlag implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_FLAG")
    private BigDecimal idFlag;
    @Size(max = 50)
    @Column(name = "V_NOM_FLAG")
    private String vNomFlag;
    @Size(max = 30)
    @Column(name = "V_NOM_CORTO")
    private String vNomCorto;

    public ScatbpFlag() {
    }

    public ScatbpFlag(BigDecimal idFlag) {
        this.idFlag = idFlag;
    }

    public BigDecimal getIdFlag() {
        return idFlag;
    }

    public void setIdFlag(BigDecimal idFlag) {
        this.idFlag = idFlag;
    }

    public String getVNomFlag() {
        return vNomFlag;
    }

    public void setVNomFlag(String vNomFlag) {
        this.vNomFlag = vNomFlag;
    }

    public String getVNomCorto() {
        return vNomCorto;
    }

    public void setVNomCorto(String vNomCorto) {
        this.vNomCorto = vNomCorto;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idFlag != null ? idFlag.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScatbpFlag)) {
            return false;
        }
        ScatbpFlag other = (ScatbpFlag) object;
        if ((this.idFlag == null && other.idFlag != null) || (this.idFlag != null && !this.idFlag.equals(other.idFlag))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScatbpFlag[ idFlag=" + idFlag + " ]";
    }
    
}
